var name = getPackageName("快手极速版");
toastLog(name);
// app.launch(name)

var mainBtn = className("androidx.appcompat.app.ActionBar$c").desc("去赚钱").findOne();
click(mainBtn.bounds().centerX(), mainBtn.bounds().centerY())
getUserInfo()


function closePopup(){
    if(id("close").exists()){
        id("close").findOne().click()
    }
}

function getUserInfo(){
    closePopup();
    className("android.widget.ListView").findOne().children().forEach(child => {
        child.children().forEach(element => {
            console.log(element.text())
        });
    });
}